#include <iostream>
using namespace std;

int *func()
{
    int *p = new int(10);
    return p;
}
void test2()
{
    int *arr = new int[10];
    for (int i = 0; i < 10; i++)
    {
        arr[i] = i + 100;
    }
    for (int i = 0; i < 10; i++)
    {
        cout << arr[i] << endl;
    }
    delete[] arr;
}
void test()
{
    int *p = func();
    cout << *p << endl;
    cout << *p << endl;
    cout << *p << endl;
    delete p;
    cout << *p << endl;
}
int main()
{
    test();
    test2();
    int a = 10;
    int &b = a;
    return 0;
}